package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.CompositeIndexLogDTO;
import com.financing.wap.dao.ICompositeIndexLogDao;
import com.financing.wap.common.SqlName;
/**
 * composite_index_log  
 * 金融指数日志 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("compositeIndexLogDao")
public class CompositeIndexLogDaoImpl extends BaseDaoImpl<CompositeIndexLogDTO, java.lang.Integer> implements ICompositeIndexLogDao {


	@Override
	public int insert(CompositeIndexLogDTO compositeIndexLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.CompositeIndexLogSql.insert, compositeIndexLog);
	}

	@Override
	public void update(CompositeIndexLogDTO compositeIndexLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.CompositeIndexLogSql.update, compositeIndexLog);
	}

	@Override
	public void updateForce(CompositeIndexLogDTO compositeIndexLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.CompositeIndexLogSql.updateForce, compositeIndexLog);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.CompositeIndexLogSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<CompositeIndexLogDTO> queryList(CompositeIndexLogDTO compositeIndexLog) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.CompositeIndexLogSql.queryList, compositeIndexLog);
	}

	@Override
	public int queryListCount(CompositeIndexLogDTO compositeIndexLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.CompositeIndexLogSql.queryListCount, compositeIndexLog);
	}

	@Override
	public CompositeIndexLogDTO loadById(Integer id) throws SQLException {
		return  (CompositeIndexLogDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.CompositeIndexLogSql.loadById,id);
	}

	@Override
	public Class<CompositeIndexLogDTO> getEntityClass() {
		return CompositeIndexLogDTO.class;
	}

	@Override
	public List<CompositeIndexLogDTO> queryCompositeByCurtime(
			CompositeIndexLogDTO compositeIndexLog) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.CompositeIndexLogSql.queryCompositeByCurtime, compositeIndexLog);
	}
 	
}
